﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;
using MySql.Data.MySqlClient;
using System.Data;

namespace ProjectBuilder
{
    [DbTable("phpdoc_const")]
    public class Const : BaseDocObject
    {        
        [DbField("class_id")]
        public long? ClassId { get; set; }

        [DbField("name")]
        public string Name { get; set; }

        [DbField("line", IsUniqField = false)]
        public int Line { get; set; }

        [DbField("value", IsUniqField = false)]
        public string Value { get; set; }

        public Const(ProjectBuilder.PhpDocTypes.Const cnts, long? classId)
        {
            Name = cnts.Name;
            Line = cnts.Line;
            Value = cnts.Value;
            ClassId = classId;
        }

        public void Save()
        {
            GetDBId();
        }
    }
}